#include "getmessagestatusrequest.h"
#include "getmessagestatusresponse.h"


GetMessageStatusRequest::GetMessageStatusRequest(qint64 userId,
                                                 const QString &sessionKey):
      m_response(new GetMessageStatusResponse(userId)),
      m_userId(userId),
      m_sessionKey(sessionKey)
{
}


GetMessageStatusRequest::~GetMessageStatusRequest()
{
    delete m_response;
    m_response = 0;
}


Network::JSONResponse &GetMessageStatusRequest::jsonResponse()
{
    return *m_response;
}


const Network::JSONResponse &GetMessageStatusRequest::jsonResponse() const
{
    return *m_response;
}


QUrl GetMessageStatusRequest::url() const
{
    QString url = QString("http://mapi2.me.zing.vn/frs/mapi2/user?method=user.getstatusdata&uids=%1&session_key=%2")
            .arg(m_userId).arg(m_sessionKey);

    return QUrl(url);
}
